package com.tlgen.caffeine.utils;

import java.net.InetAddress;
import java.net.UnknownHostException;

/*
 *@title HttpUtils
 *@description
 *@author ta151486
 *@version 1.0
 *@create 2023/12/15 9:46
 */
public class HttpUtils {

    public static String selectLocalIp() {
        try {
            InetAddress localHost = InetAddress.getLocalHost();
            String tmp = String.valueOf(localHost);
            return tmp.substring(tmp.indexOf("/") + 1);
        } catch (UnknownHostException e) {
            throw new RuntimeException(e);
        }
    }

}
